package com.zbkj.crmeb.marketing.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.crmeb.core.common.CommonResult;
import com.zbkj.crmeb.marketing.model.StoreCoupon;
import com.zbkj.crmeb.marketing.request.StoreCouponSearchRequest;
import com.zbkj.crmeb.marketing.service.StoreCouponService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;


/**
 * 优惠券配置
 * @author daigb
 * @date:  2022-01-17 13:51
 */
@RestController
@RequestMapping("api/admin/marketing/coupon")
@Api(tags = "优惠券")
public class StoreCouponController {
    @Autowired
    private StoreCouponService storeCouponService;
    /**
     * 列表
     * @author daigb
     * @date:  2022-01-17 14:53
     */
    @ApiOperation(value = "列表")
    @GetMapping(value = "/list")
    public CommonResult<List<StoreCoupon>> listEntity(StoreCouponSearchRequest storeCouponSearchRequest, HttpServletRequest request){
    	List<StoreCoupon> storeCouponCommons = storeCouponService.listEntity(storeCouponSearchRequest);
    	return CommonResult.success(storeCouponCommons);
    }

}



